#ifndef __GfxDriver_WGL_VertexBuffer_h__
#define __GfxDriver_WGL_VertexBuffer_h__

#include "GfxDriver/VertexBuffer.h"
#include "GfxDriver/WGL/GLInclude.h"

namespace Orca {

	class GfxDriver;

	//--------------------------------------------------------------------------
	class WGLVertexBuffer : public VertexBuffer {

	public:
		static WGLVertexBuffer* create(
			GfxDriver *gfxDriver,
			uint32 sizeInBytes,
			bool staticUsage);

		WGLVertexBuffer();
		virtual ~WGLVertexBuffer();

		virtual uint32 getSizeInBytes();
		virtual unsigned int getAPIHandle();

		virtual uint8* requestUpload(bool discardCurrent);
		virtual void uploadToGPU();

	private:
		GfxDriver *mGfxDriver;
		uint32 mSizeInBytes;
		GLuint mGLHandle;
		GLenum mGLUsage;

		bool _init(
			GfxDriver *gfxDriver,
			uint32 sizeInBytes,
			bool staticUsage);
	};

}

#endif	// __GfxDriver_WGL_VertexBuffer_h__